﻿
using System.Security.Cryptography;
using System.Text;

namespace L.M.System.Read.API.MD5Infor
{
    public static class GetMd5Infor
    {
        /// <summary>
        /// MD5加密
        /// </summary>
        /// <param name="uPwd">密码</param>
        /// <returns>加密后密码</returns>
        public static string Md5LogInfor(string? uPwd)
        {
            var md5 = MD5.Create();
            byte[] bytes = Encoding.UTF8.GetBytes(uPwd);
            byte[]   bytes1 = md5.ComputeHash(bytes);
            var newMd5 = BitConverter.ToString(bytes1, 5, 6).Replace("-", "");
            return newMd5;
        }
    }
}
